package org.muninn.niagara.services;

import javax.baja.sys.BComponent;
import javax.baja.sys.BIService;
import javax.baja.sys.Sys;
import javax.baja.sys.Type;

public class BMuninnService extends BComponent implements BIService
{
  public static final Type TYPE = Sys.loadType(BMuninnService.class);
  public Type[] getServiceTypes() { return new Type[] { TYPE }; }
  public Type getType() { return TYPE; }

  public void started() { ((BMuninnServiceContainer) getParent()).license(this.getName()); }
  
  public void serviceStarted() throws Exception { }

  public void serviceStopped() throws Exception { }
  
  public final boolean isParentLegal(BComponent comp) { return comp instanceof BMuninnServiceContainer; }
}
